﻿using System.Windows.Controls;
using Microsoft.Expression.Shapes;

namespace BitsOfStuff
{
    /// <summary>
    /// Class that holds and provide all user parameters and constants
    /// </summary>
    public static class MyParameters
    {
        //Constant default value
        // ReSharper disable CSharpWarnings::CS1591
        // ReSharper disable InconsistentNaming
        public static double _minimalRecognizedAngle = 0.32;

        public static double _highCurvedPrecisionParameter = 0.05;
        public static int _cornerMargedPointDistance = 10;

        public static int _curvedMargetDistance = 6;
        public static double _curvedTolerance = 0.25;
        public static double _minimalFractionToOddAnalysis = 0.3;
        public static double _handParabolTolerance = 1.08;

        private const int _shapeCountOfsectors = 4;

        public static int _shapeShadowAngle = 12;

        public static int _pdtolerance = 37;
        //SHAPE USER CHANGABLE VARIABLE
        public const int _shapeAxesDiversion = 7;
        public static int _shapeStartAngle = -90;

        public static int _charMaximumTolerantDistance { get { return 40; } }

        public static double Oover0Ratio { get { return 2; } }

        public static string selectedWindow { get; set; }

        /// <summary>
        /// CORNER ANALYSIS
        /// </summary>
        public static double cornerMinimalRecognizedAngle { get; set; }

        public static double cornerHighCurvedPrecisionParameter { get; set; }

        public static int cornerMargedPointDistance { get; set; }

        //CURVED ANALYSIS

        public static int curvedMargetDistance { get; set; }

        public static double curvedTolerance { get; set; }

        public static double curvedMinimalFractionToOddAnalysis { get; set; }

        //SUPPORT FUNCTION

        public static double supportHandParabolTolerance { get; set; }

        //PD

        public static int pdtolerance { get; set; }

        //My SHAPE

        public static int shapeCountOfsectors { get; set; }

        public static int shapeAxesDiversion { get; set; }

        public static int shapeStartAngle { get; set; }

        public static int shapeShadowAngle { get; set; }

        //STATICK GRAFICK ELEMENTS

        public static RichTextBox debugBox { get; set; }

        public static TextBlock debugText { get; set; }

        public static Arc timerSignal { get; set; }

        public static InkCanvas inkCanvas { get; set; }

        public static double gridMinimalTolerance
        {
            get { return 2; }
        }

        public static double gridMinimalSegment
        {
            get { return 20; }
        }

        public static int footSectorCount
        {
            get { return 3; }
        }

        public static void inicialize()
        {
            cornerMinimalRecognizedAngle = _minimalRecognizedAngle;
            cornerHighCurvedPrecisionParameter = _highCurvedPrecisionParameter;
            cornerMargedPointDistance = _cornerMargedPointDistance;

            curvedMargetDistance = _curvedMargetDistance;
            curvedTolerance = _curvedTolerance;
            curvedMinimalFractionToOddAnalysis = _minimalFractionToOddAnalysis;

            supportHandParabolTolerance = _handParabolTolerance;

            pdtolerance = _pdtolerance;

            shapeCountOfsectors = _shapeCountOfsectors;
            shapeAxesDiversion = _shapeAxesDiversion;
            shapeStartAngle = _shapeStartAngle;
            shapeShadowAngle = _shapeShadowAngle;
        }

        public static int shortMinimalLength { get { return 14; } }

        public static double shortMinimalDotRadius { get { return 14; } }

        public static double shortMinimalLongDistance { get { return 14; } }

        public static double pipeDistance
        {
            get { return 0.25; }
        }

        // ReSharper restore CSharpWarnings::CS1591
    }
}